/*******************************************************************************
*  file    : sin_generator.hpp
*  created : 13.04.2012
*  author  : Slyshyk Oleksiy (alex312@meta.ua)
*******************************************************************************/

#ifndef SIN_GENERATOR_HPP
#define SIN_GENERATOR_HPP

#include "abstractgenerator.hpp"

class TSinGenerator : public TAbstractGenerator
{
    Q_OBJECT
    Q_PROPERTY(double Am READ am WRITE setAm)
    Q_PROPERTY(double omega READ omega WRITE setOmega)
    Q_PROPERTY(double phi READ phi WRITE setPhi)

public:
    explicit TSinGenerator(QWidget *parent = 0);

    virtual int type(){return GF_SIN;}
    virtual QString name(){return QString("sin");}
    virtual double fx(double);

    double am   () const {return m_Am;}
    double omega() const {return m_omega;}
    double phi  () const {return m_phi;}

public slots:
    void setAm   (double arg) {m_Am = arg;}
    void setOmega(double arg) {m_omega = arg;}
    void setPhi  (double arg) {m_phi = arg;}

protected:
    double m_Am;
    double m_omega;
    double m_phi;
};

#endif // SIN_GENERATOR_HPP
